﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Empleados
{
    public partial class FrmADepartamento : Form
    {
        public FrmADepartamento()
        {
            InitializeComponent();
        }
        private void btnRegistrar_Click(object sender, EventArgs e)
        {
            FrmCDepartamento objCDepartamento = new FrmCDepartamento();
            objCDepartamento.Show();
            this.Hide();
        }

        private void FrmADepartamento_Load(object sender, EventArgs e)
        {
            clsDepartamento objDepartamento = new clsDepartamento();
            dataGrid.DataSource = objDepartamento.ObtenerDepartamento();
            if (dataGrid.Columns.Count > 0)
                dataGrid.Columns[0].Visible = false;
        }

        private void btnCancelar_Click(object sender, EventArgs e)
        {
            FrmMenuPrincipal obMenu = new FrmMenuPrincipal();
            obMenu.Show();
            this.Hide();
        }

    }
}
